package com.tiancikeji.zaoke.app.model.order;

import java.util.Date;
import java.util.List;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

public class Order {
	
	public static final int STATE_UNPAID = 0;
	
	public static final int STATE_PAID = 1;
	
	public static final int STATE_TOKEN = 2;
	
	public static final int STATE_PAID_EXPIRE = 3;
	
	public static final int STATE_UNPAID_EXPIRE = 4;
	
	public static final int STATE_CANCEL = 5;

	private long orderId;
	
	private long userId;
	
	private String userName;
	
	private long zoneId;
	
	private double salePrice;
	
	private int payWay;
	
	private int state;
	
	private Date orderTime;
	
	private Date bookTime;
	
	private Date consumeTime;
	
	private List<OrderFood> orderFood;
	
	private String url;

	@Override
	public boolean equals(Object obj) {
		return EqualsBuilder.reflectionEquals(this, obj);
	}

	@Override
	public int hashCode() {
		return HashCodeBuilder.reflectionHashCode(this);
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}

	public long getOrderId() {
		return orderId;
	}

	public void setOrderId(long orderId) {
		this.orderId = orderId;
	}

	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		this.userId = userId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public long getZoneId() {
		return zoneId;
	}

	public void setZoneId(long zoneId) {
		this.zoneId = zoneId;
	}

	public double getSalePrice() {
		return salePrice;
	}

	public void setSalePrice(double salePrice) {
		this.salePrice = salePrice;
	}

	public int getPayWay() {
		return payWay;
	}

	public void setPayWay(int payWay) {
		this.payWay = payWay;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public Date getOrderTime() {
		return orderTime;
	}

	public void setOrderTime(Date orderTime) {
		this.orderTime = orderTime;
	}

	public Date getBookTime() {
		return bookTime;
	}

	public void setBookTime(Date bookTime) {
		this.bookTime = bookTime;
	}

	public Date getConsumeTime() {
		return consumeTime;
	}

	public void setConsumeTime(Date consumeTime) {
		this.consumeTime = consumeTime;
	}

	public void setOrderFood(List<OrderFood> tmp) {
		this.orderFood = tmp;
	}

	public List<OrderFood> getOrderFood() {
		return orderFood;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}
}
